#include <Wire.h> 
#include <LiquidCrystal_I2C.h>

// Set the LCD address to 0x27 for a 16 chars and 2 line display
LiquidCrystal_I2C lcd(0x27, 16, 2);
static const uint32_t GPSBaud = 9600;
String comdata = "";

void setup()
{
	// initialize the LCD
	lcd.begin();
  Serial.begin(GPSBaud);
  Serial1.begin(GPSBaud);
  Serial2.begin(GPSBaud);
	// Turn on the blacklight and print a message.
	lcd.noBacklight();
	lcd.print("Hello, world!");
}

void loop()
{
  //Serial.println("1234");
  delay(500);
	// Do nothing here...
  
  while(Serial2.available()){
    
    comdata += char(Serial2.read());
    delay(1);
  }

  Serial1.println(comdata);
  if(comdata.indexOf("1-1")!=-1){
    lcd.backlight();
    lcd.clear();
    lcd.print("is person!");
    Serial.println("is person!");
    delay(3000);
  }
  if(comdata.indexOf("1-0")!=-1){
    lcd.backlight();
    lcd.clear();
    lcd.print("all clear!");
    Serial.println("all clear!");
    delay(3000);
  }
  comdata = "";
  lcd.noBacklight();
}
